<?php
/*
 * Class is used to start up and is configured to use
 * directives in the configuration file
 */
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
    /*
     * Load resources within application directory automatically
     *
     * @return Zend_Application_Module_Autoloader
     */
    public function _initAutoloader()
    {
        $moduleLoader = new Zend_Application_Module_Autoloader(
            array('namespace' => 'Default',
            'basePath' => APPLICATION_PATH));

        return $moduleLoader;
    }

    /*
     * Register controller plugin for using later
     */
    public function _initControllerPlugin()
    {
        $this->bootstrap('frontController');
        $frontController = $this->getResource('frontController');
        $frontController->registerPlugin(new Dragon_Application_Plugin_Acl());
        return $frontController;
    }

    /*
     * Retrieve and setup view for rendering later
     *
     */
    public function _initViewHelpers()
    {
        $this->bootstrap('layout');
        $layout = $this->getResource('layout');
        $view = $layout->getView();

        $view->doctype('XHTML1_STRICT');
		$view->headMeta()->appendHttpEquiv('Content-Type', 'text/html;charset=utf-8');
		$view->headTitle()->setSeparator(' - ');
		$view->headTitle('zf-blog');
    }
}